package com.lemner.ke.activity;

import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.content.Intent;
import android.os.Handler;
import android.view.View;
import android.view.ViewPropertyAnimator;
import android.webkit.WebChromeClient;
import android.widget.ImageView;
import android.widget.Toast;

import com.lemner.ke.R;
import com.lemner.ke.base.PlayBaseActivity;
import com.lemner.ke.view.welcome.ParticleView;

public class WelcomeActivity extends PlayBaseActivity {
    ParticleView mWelcome;
    @Override
    public int getLayoutFile() {
        return R.layout.activity_welcome;
    }

    @Override
    public void initView() {
        mWelcome=findViewById(R.id.pv_4);
    }

    @Override
    public void initEvent() {

        mWelcome.setOnParticleAnimListener(new ParticleView.ParticleAnimListener() {
            @Override
            public void onAnimationEnd() {
                Intent intent=new Intent(WelcomeActivity.this,HomeActivity.class);
                startActivity(intent);
                overridePendingTransition(0, 0);//取消过场动画
                finish();
            }
        });
        mWelcome.postDelayed(new Runnable() {
            @Override
            public void run() {
                mWelcome.startAnim();
            }
        }, 200);


    }

    @Override
    public void initData() {
    }

    @Override
    public void onClick(View v) {

    }
}
